package com.example.yam.greenapp;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import org.w3c.dom.Text;

public class PayFinishActivity extends AppCompatActivity {
    private TextView total = null;
    private TextView dnum = null;
    private TextView btn = null;//回到首页
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pay_finish);
        this.total = (TextView) super.findViewById(R.id.finish_total);
        this.dnum = (TextView) super.findViewById(R.id.finish_dnum);
        this.btn = (TextView) super.findViewById(R.id.backtomain);
        init();
        this.btn.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                Intent it = new Intent(PayFinishActivity.this,MainActivity.class);
                startActivity(it);

                PayFinishActivity.this.finish();
            }
        });
    }
    public void init(){
        Intent it = getIntent();
        this.total.setText(it.getStringExtra("totalprice")+"元");
        this.dnum.setText(it.getStringExtra("dnum"));
    }
}
